<?php
namespace Views\Widgets;
use App;

/**
 * @author Evgeny Baranov <evgeny@baranov.eu>
 */
class Login extends Base {
    public function __construct() {

        parent::__construct();

        $user = App::getCurrentUser();

        if ($user) {
            $this->setData('user', $user);
            $this->tmpl = 'logged.phtml';
        } else {
            $this->tmpl = 'login.phtml';
        }
    }
}
